$(function() {
	if(localStorage.getItem("$commentBuy") === null) {
		mui.alert("暂无数据");
	} else {
		
		
		let goodsItem = JSON.parse(localStorage.getItem('$commentBuy'));
			for(let i = 0; i < goodsItem.length ; i++){
				$('#goodsItem').append(
					"<ul>"+
				"<li>"+
				"</li>"+
				"<li>"+
					"<img src='"+goodsItem[i].images+"'/>"+
					"<div class='flex1'>"+
						"<h4>"+goodsItem[i].title+"</h4>"+
						"<p>颜色:<label class='mr-6'>"+goodsItem[i].color+"</label>尺寸:<label>"+goodsItem[i].size+"</label></p>"+
						"<h5 class='mui-text-right font-color-pink'>￥<label>"+goodsItem[i].price+"</label></h5>"+
						"<p class='mui-text-right font-color-gray'>x<label>"+goodsItem[i].num+"</label></p>"+
					"</div>"+
				"</li>"+
				"<li>"+
					"<span>商品总额</span>"+
					"<span class='font-color-gray'>￥<label>"+goodsItem[i].price*goodsItem[i].num+"</label></span>"+
				"</li>"+
				"<li>"+
					"<button class='payment'><a href='new-commit.html' style='color:white;'>去评论</a></button>"+
				"</li>"+
			"</ul>");
			}
	}
	
	
	localStorage.setItem("$commitId","1");
});